window.onscroll=function(){
function get_scrollTop_of_body(){ //scrollTop能力检测函数
			var scrollTop; 
			if(typeof window.pageYOffset != 'undefined'){ 
			scrollTop = window.pageYOffset; 
			} 
			else 
			if(typeof document.compatMode != 'undefined' && 
			document.compatMode != 'BackCompat'){ 
			scrollTop = document.documentElement.scrollTop; 
			} 
			else 
			if(typeof document.body != 'undefined'){ 
			scrollTop = document.body.scrollTop; 
			} 
			return scrollTop; 
		}
var myScrollTop = parseInt(get_scrollTop_of_body());//获取ScrollTop的值
if( myScrollTop >= 0 && myScrollTop <185){//信号量预判内容块区间
	$(".clossing_tip").removeClass("over");
}else{
	$(".clossing_tip").addClass("over");
}
}
function clossing_tip(){
	$(".clossing_tip").css("display","block");
	setTimeout(function(){$(".clossing_tip").css("display","none");},3000);
}
var bar_width=0;
$(function(){
    $("a,input:button,input:submit,input:checkbox").focus(function(){this.blur();});	
	//图片翻页
    picRoll();
	picRoll_2();
});
function picRoll() {
	 var li_num=$("#product_pic li").length;
	 var ul_width=li_num*84;
	 var ul_left=0;
	 if(li_num>4){
		 $(".pic_btn_left").css("display","block");
		 $(".pic_btn_right").css("display","block");
		 $("#product_pic ul").css("width",ul_width+"px");
		 var max_left=ul_width-336;
		 $(".pic_btn_left").click(function(){
			 if(ul_left<0){
				 ul_left=ul_left+336;
			     $("#product_pic ul").animate({left:ul_left},500);	 
				 }
		 });  
		 $(".pic_btn_right").click(function(){
			 if(ul_left>-max_left){
				 ul_left=ul_left-336;
			     $("#product_pic ul").animate({left:ul_left},500);	
				 }
			 
		 });
	 }else{
		 $(".pic_btn_left").css("display","none");
		 $(".pic_btn_right").css("display","none"); 
	 };	   
	$("#product_pic li").mouseover(function(){
		  $(this).children(".setNdelete").animate({bottom:0},100);
	});
	$("#product_pic li").mouseleave(function(){
		  $(this).children(".setNdelete").animate({bottom:-25+"px"},100);
	});
  
}
function picRoll_2() {
	 var li_num=$("#text_area_pic li").length;
	 var ul_width=li_num*84;
	 var ul_left=0;
	 if(li_num>4){
		 $(".pic_btn_left_2").css("display","block");
		 $(".pic_btn_right_2").css("display","block");
		 $("#text_area_pic ul").css("width",ul_width+"px");
		 var max_left=ul_width-336;
		 $(".pic_btn_left_2").click(function(){
			 if(ul_left<0){
				 ul_left=ul_left+336;
			     $("#text_area_pic ul").animate({left:ul_left},500);	 
				 }
		 });  
		 $(".pic_btn_right_2").click(function(){
			 if(ul_left>-max_left){
				 ul_left=ul_left-336;
			     $("#text_area_pic ul").animate({left:ul_left},500);	
				 }
			 
		 });
	 }else{
		 $(".pic_btn_left_2").css("display","none");
		 $(".pic_btn_right_2").css("display","none"); 
	 };	   
	$("#text_area_pic li").mouseover(function(){
		  $(this).children(".setNdelete").animate({bottom:0},100);
	});
	$("#text_area_pic li").mouseleave(function(){
		  $(this).children(".setNdelete").animate({bottom:-25+"px"},100);
	});
  
}
function jk(){$('#sure').addClass('button_y28');}
function jk_move(){
	//$('#sure').removeClass('button_y28');
    var a = $('#beginMoney').val();
    var b = $('#endMoney').val();
	if (a == ''&& b=='') { 
	$('#sure').removeClass('button_y28');return false; }
}

function search() {
var key = $('#beginMoney').val();
var key1 = $('#endMoney').val();
if (key == ''&& key1=='') { alert('请输入搜索关键词!'); $('#sure').focus(); return false; }
window.location.href = encodeURI('merchant.html');
return false;
}

function jk2(){$('#sure_2').addClass('button_y28');}

function jk_move2(){
	var c = $('#keyword').val();
	if (c == '') { 
	$('#sure_2').removeClass('button_y28');return false; }	  
}

function search2() {
var keyword = $('#keyword').val();
if (keyword == '') { alert('请输入搜索关键词!'); $('#sure_2').focus(); return false; }
window.location.href = encodeURI('login.html');
return false;
}

